<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	
</script>

<script type="text/javascript" src="<%=basePath%>js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/vue.min.js"></script>
<link rel="stylesheet" href="<%=basePath%>css/layui/css/layui.css">
<script type="text/javascript"
	src="<%=basePath%>js/editProductionPlan/editProductionPlan.js"></script>
<script type="text/javascript" src="<%=basePath%>js/BaseUtile.js"></script>




</head>

<body style="padding: 3%">
	<div style="text-align: center;font-size: 30px">
	制定生产计划
	</div>



	<!-- 填写生产计划 -->
	<div class="layui-form" style="border: 1px solid gray; padding-top: 2%">
		<div class="layui-inline">
			<label class="layui-form-label">生产时间：</label>
			<div class="layui-input-inline">
				<input id="inputProductTime" name="productTime"   style="width: 150px" type="text"
					class="layui-input" placeholder="年-月-日" >
			</div>
		</div>
		<div style="margin-top: 1%; padding-bottom: 2%">
			<label class="layui-form-label">创建人：</label> <input
				 style="width: 150px" type="text"
				class="layui-input" value="${userInfo.nickname}" disabled="" />
		</div>
		<div style="margin-top: 1%; padding-bottom: 2%">
			<label class="layui-form-label">生产成本：</label> <input
			id='inputTotalPrice'
				 style="width: 150px" type="text"
				class="layui-input" disabled="" />
		</div>
		<!-- 暂时默认设置1 -->
		<input id="inputCreateById" value="1" style="display: none"/>
	</div>

	<div>
		<div style="margin-top: 2%">
			<label class="layui-form-label">菜品:</label>
			<button class="layui-btn layui-btn-danger" id="chooseFoodButton">选择菜品</button>
		</div>
		<hr class="layui-bg-orange">
		<div id="breakfastData">
			<label class="layui-form-label">餐次：早餐</label>
			<table class="layui-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>名称</th>
						<th>数量</th>
						<th>单位</th>
						<th>任务分配</th>
						<th>操作</th>
					</tr>
				</thead>
				<tr v-for="(item ,index) in items">
					<th>{{index+1}}</th>
					<th>{{item.foodName}}</th>
					<th>{{item.foodQuantity}}</th>
					<th>{{item.unitName}}</th>
					<th>{{item.productByName}}</th>
					<th><button class="layui-btn layui-btn-sm"
							v-on:click="onclick(item,index,1)">删除</button></th>
				</tr>
			</table>
		</div>
		<hr class="layui-bg-orange">

		<div id="lunch">
			<label class="layui-form-label">餐次：午餐</label>
			<table class="layui-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>名称</th>
						<th>数量</th>
						<th>单位</th>
						<th>任务分配</th>
						<th>操作</th>
					</tr>
				</thead>
				<tr v-for="(item ,index) in items">
					<th>{{index+1}}</th>
					<th>{{ item.foodName}}</th>
					<th>{{ item.foodQuantity}}</th>
					<th>{{ item.unitName}}</th>
					<th>{{ item.productByName}}</th>
					<th><button class="layui-btn layui-btn-sm"
							v-on:click="onclick(item,index,2)">删除</button></th>
				</tr>
			</table>
		</div>

		<hr class="layui-bg-orange">

		<div id="dinner">
			<label class="layui-form-label">餐次：晚餐</label>
			<table class="layui-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>名称</th>
						<th>数量</th>
						<th>单位</th>
						<th>任务分配</th>
						<th>操作</th>
					</tr>
				</thead>
				<tr v-for="(item ,index) in items">
					<th>{{index+1}}</th>
					<th>{{ item.foodName}}</th>
					<th>{{ item.foodQuantity}}</th>
					<th>{{ item.unitName}}</th>
					<th>{{ item.productByName}}</th>
					<th><button class="layui-btn layui-btn-sm"
							v-on:click="onclick(item,index,3)">删除</button></th>
				</tr>
			</table>
		</div>
		<hr class="layui-bg-orange">
		<div>
			<label class="layui-form-label">备注:</label>
			<textarea id="inputRemark" placeholder="请输入内容" class="layui-textarea"></textarea>
		</div>
		<hr class="layui-bg-orange">
		<div style="margin-bottom: 5%">
			<button id="submitPlanButton" class="layui-btn layui-btn-fluid">提交</button>
		</div>


	</div>



	<script type="text/javascript" src="<%=basePath%>css/layui/layui.js"></script>
	<script>
		//时间选择器
		layui.use('laydate', function() {
			var laydate = layui.laydate;
			//墨绿主题
			laydate.render({
				elem : '#inputProductTime',
				theme : 'molv'
			});
		});

		
		layui.use('form', function() {
			//表单验证
			 
			 
			 
		});
	</script>
</body>
</html>